package com.local.webservice.client;

import com.local.webservice.service.HelloWorld;
import com.local.webservice.service.HelloWorldService;
import com.local.webservice.service.Role;
import com.local.webservice.service.User;
import org.omg.PortableInterceptor.USER_EXCEPTION;
import sun.rmi.server.UnicastServerRef;

import java.util.List;

/**
 * @author lou ke
 * @version 1.0
 * @since 2020/5/8 17:23
 */
public class Client {
    public static void main(String[] args) {
        HelloWorldService service = new HelloWorldService();
        HelloWorld helloWorldPort = service.getHelloWorldPort();

        User user = new User();
        user.setName("admin");
        user.setPassword("123");

        List<Role> roles = helloWorldPort.getRoleByUser(user);
        for (Role role : roles) {
            System.out.println("------" + role.getRoleName());
        }
    }
}
